<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
	<title>挂卖记录</title>
	<script src="/static/mobile/js/mui.min.js"></script>
	<link href="/static/mobile/css/mui.min.css" rel="stylesheet"/>
	<link rel="stylesheet" type="text/css" href="/static/mobile/css/basic.css"/>
	<link rel="stylesheet" type="text/css" href="/static/mobile/css/active_huiyuan.css"/>
	<script type="text/javascript" src="/static/mobile/js/jquery.js"></script>
	<script type="text/javascript" charset="utf-8">
		mui.init();
	</script>
</head>
<style>
	.section4-2 ul li{
		border-bottom: none !important;
	}
	.section4-2 ul {
		border-bottom: 1px solid #eee;
	}
</style>
<body>
<div class="sectionx">
	<header class="mui-bar mui-bar-nav" >
		<a class="mui-icon mui-icon-left-nav mui-pull-left" href="javascript:history.back(-1)" style="color: #4E4E4E;"></a>
		<h1 class="mui-title">挂卖记录</h1>
	</header>
</div>
<div class="section3">
</div>
<div class="ge"></div>

<div class="section4">
	<div class="layui-form">
		<div class="section4-1 mui-clearfix">
			<ul>
				<li style='width:14.2%'>会员编号</li>
				<li style='width:14.2%'>数量</li>
				<li style='width:14.2%'>单价</li>
				<li style='width:14.2%'>手续费</li>
				<li style='width:14.2%'>时间</li>
				<li style='width:14.2%'>购买者编号</li>
				<li style='width:14.2%'>操作</li>
			</ul>
		</div>
		<div class="section4-2 mui-clearfix">
			{volist name='lists' id='vo'}
			<ul class=" mui-clearfix">
				<li style='width:14.2%'>{$vo.unickname}</li>
				<li style='width:14.2%'> {$vo.num}</li>
				<li style='width:14.2%'>{$vo.price}</li>
				<li style='width:14.2%'>{$sys.guamai_fei}%</li>
				<li style='width:14.2%'>{$vo.createtime|date="Y-m-d H:i:s"}</li>
				<li style='width:14.2%'>{$vo.gnickname}</li>
				<li style='width:14.2%'>
					{if $vo.is_ok==2}
					交易成功
					{/if}
					{if $vo.is_ok==3}
					<button  class="layui-btn" onclick="return commints('{$vo.id}');"  style="padding: 4px 8px;color: #fff;background: red;border-color: red" >确认收款</button>
					{/if}
					{if $vo.is_ok==0||$vo.is_ok==1}
					<button  class="layui-btn" onclick="return chexiao('{$vo.id}');"  style="padding: 4px 8px;color: #fff;background: red;border-color: red" >撤销</button>
					{/if}
				</li>
			</ul>
			{/volist}

		</div>
	</div>
</div>

{$page|raw}

</body>
<script type="text/javascript" >
	mui('body').on( 'tap' , 'a' , function(){
		document.location.href=this.href;
	})
</script>
<script src="/static/plugins/layui/layui.js"></script>
<script>
	function commints(id){
		$.ajax({
			type : "POST",  //请求方式
			async:false,
			url : "{:url('guamai_pay')}",  //请求路径
			dataType:"html",
			data :'id='+id,
			success : function(msg) {  //异步请求成功执行的回调函数
				var jsonParseJson=JSON.parse(msg);
				if(jsonParseJson['success']==1){
					layer.msg(jsonParseJson['msg'],{time:1000,icon:1},function(){
						location.href = "{:url('guamai_record')}";
					});
				}else{
					layer.msg(jsonParseJson['msg'],{time:1000,icon:2});
				}

			}
		});
	}
	function chexiao(id){
		$.ajax({
			type : "POST",  //请求方式
			async:false,
			url : "{:url('chexiao')}",  //请求路径
			dataType:"html",
			data :'id='+id,
			success : function(msg) {  //异步请求成功执行的回调函数
				var jsonParseJson=JSON.parse(msg);
				if(jsonParseJson['success']==1){
					layer.msg(jsonParseJson['msg'],{time:1000,icon:1},function(){
						location.href = "{:url('guamai_record')}";
					});
				}else{
					layer.msg(jsonParseJson['msg'],{time:1000,icon:2});
				}

			}
		});
	}
	layui.use(['form', 'layer'], function () {

	})
</script>


</html>